package com.jin.model.dto;

import lombok.Data;

/**
 * 扫码登录状态响应DTO
 */
@Data
public class QrLoginStatusResponse {
    /**
     * 登录状态：waiting, confirmed, expired
     */
    private String status;
    
    /**
     * 管理员JWT令牌（仅在confirmed状态时返回）
     */
    private String token;
    
    /**
     * 用户信息（仅在confirmed状态时返回）
     */
    private UserInfo userInfo;
    
    @Data
    public static class UserInfo {
        private String openId;
        private String nickname;
        private String avatarUrl;
    }
    
    public QrLoginStatusResponse(String status) {
        this.status = status;
    }
    
    public QrLoginStatusResponse(String status, String token, UserInfo userInfo) {
        this.status = status;
        this.token = token;
        this.userInfo = userInfo;
    }
}
